# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=ukui-panel
pkgver=3.0.6.4
pkgrel=3
pkgdesc="Launcher and docking facility for UKUI"
arch=('loong64' 'x86_64')
license=('GPL')
url="https://github.com/ukui/ukui-panel"
groups=('ukui')
provides=('ukui-indicators')
replaces=('ukui-indicators')
depends=('dconf' 'gsettings-qt' 'kwindowsystem5' 'libdbusmenu-qt5' 'libqtxdg' 'peony'
         'ukui-biometric-auth' 'ukui-menu' 'ukui-menus')
makedepends=('cmake' 'ninja' 'qt5-tools')
source=("$pkgname-$pkgver.tar.gz::https://github.com/ukui/ukui-panel/archive/v$pkgver.tar.gz")
sha512sums=('a80c4a096daa1e08fe68cc0f8f117de9b76026f1ccc23790375fd2286deeba5c3a48e29eaf330c64f6106cfe2e51832e73c7cca09e0673009d5b3eb9583708cd')

prepare() {
  mkdir -p build
  sed -i '1i #include <QPainterPath>' $pkgname-$pkgver/ukui-flash-disk/ejectInterface.cpp
  sed -e '/QtWebKit/d' -i $pkgname-$pkgver/plugin-calendar/ukuicalendar.*
}

build() {
  cd build
  cmake ../$pkgname-$pkgver \
    -GNinja -DCMAKE_INSTALL_PREFIX=/usr
  ninja
}

package() {
  cd build
  DESTDIR="$pkgdir" ninja install
}
